home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  55.6 KB  |  1,734 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Quickdraw.h
  3.  
  4.      Contains:    Quickdraw Graphics Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __QUICKDRAW__
  19. #define __QUICKDRAW__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __MIXEDMODE__
  25. #include <MixedMode.h>
  26. #endif
  27. #ifndef __QUICKDRAWTEXT__
  28. #include <QuickdrawText.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     invalColReq                    = -1,                            /*invalid color table request*/
  56.                                                                 /* transfer modes */
  57.     srcCopy                        = 0,                            /*the 16 transfer modes*/
  58.     srcOr                        = 1,
  59.     srcXor                        = 2,
  60.     srcBic                        = 3,
  61.     notSrcCopy                    = 4,
  62.     notSrcOr                    = 5,
  63.     notSrcXor                    = 6,
  64.     notSrcBic                    = 7,
  65.     patCopy                        = 8,
  66.     patOr                        = 9,
  67.     patXor                        = 10,
  68.     patBic                        = 11,
  69.     notPatCopy                    = 12,
  70.     notPatOr                    = 13,
  71.     notPatXor                    = 14,
  72.     notPatBic                    = 15,                            /* Special Text Transfer Mode */
  73.     grayishTextOr                = 49,
  74.     hilitetransfermode            = 50,
  75.     hilite                        = 50,                            /* Arithmetic transfer modes */
  76.     blend                        = 32,
  77.     addPin                        = 33,
  78.     addOver                        = 34,
  79.     subPin                        = 35,
  80.     addMax                        = 37,
  81.     adMax                        = 37,
  82.     subOver                        = 38,
  83.     adMin                        = 39,
  84.     ditherCopy                    = 64,                            /* Transparent mode constant */
  85.     transparent                    = 36
  86. };
  87.  
  88.  
  89. enum {
  90.     italicBit                    = 1,
  91.     ulineBit                    = 2,
  92.     outlineBit                    = 3,
  93.     shadowBit                    = 4,
  94.     condenseBit                    = 5,
  95.     extendBit                    = 6,                            /* QuickDraw color separation constants */
  96.     normalBit                    = 0,                            /*normal screen mapping*/
  97.     inverseBit                    = 1,                            /*inverse screen mapping*/
  98.     redBit                        = 4,                            /*RGB additive mapping*/
  99.     greenBit                    = 3,
  100.     blueBit                        = 2,
  101.     cyanBit                        = 8,                            /*CMYBk subtractive mapping*/
  102.     magentaBit                    = 7,
  103.     yellowBit                    = 6,
  104.     blackBit                    = 5
  105. };
  106.  
  107.  
  108. enum {
  109.     blackColor                    = 33,                            /*colors expressed in these mappings*/
  110.     whiteColor                    = 30,
  111.     redColor                    = 205,
  112.     greenColor                    = 341,
  113.     blueColor                    = 409,
  114.     cyanColor                    = 273,
  115.     magentaColor                = 137,
  116.     yellowColor                    = 69
  117. };
  118.  
  119.  
  120. enum {
  121.     picLParen                    = 0,                            /*standard picture comments*/
  122.     picRParen                    = 1,
  123.     clutType                    = 0,                            /*0 if lookup table*/
  124.     fixedType                    = 1,                            /*1 if fixed table*/
  125.     directType                    = 2,                            /*2 if direct values*/
  126.     gdDevType                    = 0                                /*0 = monochrome 1 = color*/
  127. };
  128.  
  129.  
  130. enum {
  131.     interlacedDevice            = 2,                            /* 1 if single pixel lines look bad */
  132.     roundedDevice                = 5,                            /* 1 if device has been “rounded” into the GrayRgn */
  133.     hasAuxMenuBar                = 6,                            /* 1 if device has an aux menu bar on it */
  134.     burstDevice                    = 7,
  135.     ext32Device                    = 8,
  136.     ramInit                        = 10,                            /*1 if initialized from 'scrn' resource*/
  137.     mainScreen                    = 11,                            /* 1 if main screen */
  138.     allInit                        = 12,                            /* 1 if all devices initialized */
  139.     screenDevice                = 13,                            /*1 if screen device [not used]*/
  140.     noDriver                    = 14,                            /* 1 if no driver for this GDevice */
  141.     screenActive                = 15,                            /*1 if in use*/
  142.     hiliteBit                    = 7,                            /*flag bit in HiliteMode (lowMem flag)*/
  143.     pHiliteBit                    = 0,                            /*flag bit in HiliteMode used with BitClr procedure*/
  144.     defQDColors                    = 127,                            /*resource ID of clut for default QDColors*/
  145.                                                                 /* pixel type */
  146.     RGBDirect                    = 16,                            /* 16 & 32 bits/pixel pixelType value */
  147.                                                                 /* pmVersion values */
  148.     baseAddr32                    = 4                                /*pixmap base address is 32-bit address*/
  149. };
  150.  
  151.  
  152.  
  153. enum {
  154.     sysPatListID                = 0,
  155.     iBeamCursor                    = 1,
  156.     crossCursor                    = 2,
  157.     plusCursor                    = 3,
  158.     watchCursor                    = 4
  159. };
  160.  
  161.  
  162. enum {
  163.     kQDGrafVerbFrame            = 0,
  164.     kQDGrafVerbPaint            = 1,
  165.     kQDGrafVerbErase            = 2,
  166.     kQDGrafVerbInvert            = 3,
  167.     kQDGrafVerbFill                = 4
  168. };
  169.  
  170. #if OLDROUTINENAMES
  171.  
  172. enum {
  173.     frame                        = kQDGrafVerbFrame,
  174.     paint                        = kQDGrafVerbPaint,
  175.     erase                        = kQDGrafVerbErase,
  176.     invert                        = kQDGrafVerbInvert,
  177.     fill                        = kQDGrafVerbFill
  178. };
  179.  
  180. #endif  /* OLDROUTINENAMES */
  181.  
  182. typedef SInt8                             GrafVerb;
  183.  
  184. enum {
  185.     chunky                        = 0,
  186.     chunkyPlanar                = 1,
  187.     planar                        = 2
  188. };
  189.  
  190. typedef SInt8                             PixelType;
  191. typedef short                             Bits16[16];
  192.  
  193. /***************   IMPORTANT NOTE REGARDING Pattern  **************************************
  194.    Patterns were originally defined as:
  195.    
  196.         C:             typedef unsigned char Pattern[8];
  197.         Pascal:        Pattern = PACKED ARRAY [0..7] OF 0..255;
  198.         
  199.    The old array defintion of Pattern would cause 68000 based CPU's to crash in certain circum-
  200.    stances. The new struct definition is safe, but may require source code changes to compile.
  201.    Read the details in TechNote "Platforms & Tools" #PT 38.
  202.     
  203. *********************************************************************************************/
  204. struct Pattern {
  205.     UInt8                             pat[8];
  206. };
  207. typedef struct Pattern Pattern;
  208.  
  209. /*
  210.  ConstPatternParam is now longer needed.  It was first created when Pattern was an array.
  211.  Now that Pattern is a struct, it is more straight forward just add the "const" qualifier
  212.  on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").
  213. */
  214. typedef const Pattern *                    ConstPatternParam;
  215. typedef Pattern *                        PatPtr;
  216. typedef PatPtr *                        PatHandle;
  217. typedef SignedByte                         QDByte;
  218. typedef QDByte *                        QDPtr;
  219. typedef QDPtr *                            QDHandle;
  220. typedef short                             QDErr;
  221.  
  222. enum {
  223.     singleDevicesBit            = 0,
  224.     dontMatchSeedsBit            = 1,
  225.     allDevicesBit                = 2
  226. };
  227.  
  228.  
  229. enum {
  230.     singleDevices                = 1 << singleDevicesBit,
  231.     dontMatchSeeds                = 1 << dontMatchSeedsBit,
  232.     allDevices                    = 1 << allDevicesBit
  233. };
  234.  
  235. typedef unsigned long                     DeviceLoopFlags;
  236. struct BitMap {
  237.     Ptr                             baseAddr;
  238.     short                             rowBytes;
  239.     Rect                             bounds;
  240. };
  241. typedef struct BitMap BitMap;
  242.  
  243. typedef BitMap *                        BitMapPtr;
  244. typedef BitMapPtr *                        BitMapHandle;
  245. struct Cursor {
  246.     Bits16                             data;
  247.     Bits16                             mask;
  248.     Point                             hotSpot;
  249. };
  250. typedef struct Cursor Cursor;
  251.  
  252. typedef Cursor *                        CursPtr;
  253. typedef CursPtr *                        CursHandle;
  254. struct PenState {
  255.     Point                             pnLoc;
  256.     Point                             pnSize;
  257.     short                             pnMode;
  258.     Pattern                         pnPat;
  259. };
  260. typedef struct PenState PenState;
  261.  
  262. struct Region {
  263.     unsigned short                     rgnSize;                    /*size in bytes*/
  264.     Rect                             rgnBBox;                    /*enclosing rectangle*/
  265. };
  266. typedef struct Region Region;
  267.  
  268. typedef Region *                        RgnPtr;
  269. typedef RgnPtr *                        RgnHandle;
  270. struct Picture {
  271.     short                             picSize;
  272.     Rect                             picFrame;
  273. };
  274. typedef struct Picture Picture;
  275.  
  276. typedef Picture *                        PicPtr;
  277. typedef PicPtr *                        PicHandle;
  278. struct Polygon {
  279.     short                             polySize;
  280.     Rect                             polyBBox;
  281.     Point                             polyPoints[1];
  282. };
  283. typedef struct Polygon Polygon;
  284.  
  285. typedef Polygon *                        PolyPtr;
  286. typedef PolyPtr *                        PolyHandle;
  287. typedef CALLBACK_API( void , QDTextProcPtr )(short byteCount, Ptr textBuf, Point numer, Point denom);
  288. typedef CALLBACK_API( void , QDLineProcPtr )(Point newPt);
  289. typedef CALLBACK_API( void , QDRectProcPtr )(GrafVerb verb, Rect *r);
  290. typedef CALLBACK_API( void , QDRRectProcPtr )(GrafVerb verb, Rect *r, short ovalWidth, short ovalHeight);
  291. typedef CALLBACK_API( void , QDOvalProcPtr )(GrafVerb verb, Rect *r);
  292. typedef CALLBACK_API( void , QDArcProcPtr )(GrafVerb verb, Rect *r, short startAngle, short arcAngle);
  293. typedef CALLBACK_API( void , QDPolyProcPtr )(GrafVerb verb, PolyHandle poly);
  294. typedef CALLBACK_API( void , QDRgnProcPtr )(GrafVerb verb, RgnHandle rgn);
  295. typedef CALLBACK_API( void , QDBitsProcPtr )(BitMap *srcBits, Rect *srcRect, Rect *dstRect, short mode, RgnHandle maskRgn);
  296. typedef CALLBACK_API( void , QDCommentProcPtr )(short kind, short dataSize, Handle dataHandle);
  297. typedef CALLBACK_API( short , QDTxMeasProcPtr )(short byteCount, Ptr textAddr, Point *numer, Point *denom, FontInfo *info);
  298. typedef CALLBACK_API( void , QDGetPicProcPtr )(Ptr dataPtr, short byteCount);
  299. typedef CALLBACK_API( void , QDPutPicProcPtr )(Ptr dataPtr, short byteCount);
  300. typedef CALLBACK_API( void , QDOpcodeProcPtr )(Rect *fromRect, Rect *toRect, short opcode, short version);
  301. typedef CALLBACK_API( void , QDJShieldCursorProcPtr )(short left, short top, short right, short bottom);
  302. typedef STACK_UPP_TYPE(QDTextProcPtr)                             QDTextUPP;
  303. typedef STACK_UPP_TYPE(QDLineProcPtr)                             QDLineUPP;
  304. typedef STACK_UPP_TYPE(QDRectProcPtr)                             QDRectUPP;
  305. typedef STACK_UPP_TYPE(QDRRectProcPtr)                             QDRRectUPP;
  306. typedef STACK_UPP_TYPE(QDOvalProcPtr)                             QDOvalUPP;
  307. typedef STACK_UPP_TYPE(QDArcProcPtr)                             QDArcUPP;
  308. typedef STACK_UPP_TYPE(QDPolyProcPtr)                             QDPolyUPP;
  309. typedef STACK_UPP_TYPE(QDRgnProcPtr)                             QDRgnUPP;
  310. typedef STACK_UPP_TYPE(QDBitsProcPtr)                             QDBitsUPP;
  311. typedef STACK_UPP_TYPE(QDCommentProcPtr)                         QDCommentUPP;
  312. typedef STACK_UPP_TYPE(QDTxMeasProcPtr)                         QDTxMeasUPP;
  313. typedef STACK_UPP_TYPE(QDGetPicProcPtr)                         QDGetPicUPP;
  314. typedef STACK_UPP_TYPE(QDPutPicProcPtr)                         QDPutPicUPP;
  315. typedef STACK_UPP_TYPE(QDOpcodeProcPtr)                         QDOpcodeUPP;
  316. typedef STACK_UPP_TYPE(QDJShieldCursorProcPtr)                     QDJShieldCursorUPP;
  317. struct QDProcs {
  318.     QDTextUPP                         textProc;
  319.     QDLineUPP                         lineProc;
  320.     QDRectUPP                         rectProc;
  321.     QDRRectUPP                         rRectProc;
  322.     QDOvalUPP                         ovalProc;
  323.     QDArcUPP                         arcProc;
  324.     QDPolyUPP                         polyProc;
  325.     QDRgnUPP                         rgnProc;
  326.     QDBitsUPP                         bitsProc;
  327.     QDCommentUPP                     commentProc;
  328.     QDTxMeasUPP                     txMeasProc;
  329.     QDGetPicUPP                     getPicProc;
  330.     QDPutPicUPP                     putPicProc;
  331. };
  332. typedef struct QDProcs QDProcs;
  333.  
  334. typedef QDProcs *                        QDProcsPtr;
  335. enum { uppQDTextProcInfo = 0x00003F80 };                         /* pascal no_return_value Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  336. enum { uppQDLineProcInfo = 0x000000C0 };                         /* pascal no_return_value Func(4_bytes) */
  337. enum { uppQDRectProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  338. enum { uppQDRRectProcInfo = 0x00002B40 };                         /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
  339. enum { uppQDOvalProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  340. enum { uppQDArcProcInfo = 0x00002B40 };                         /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
  341. enum { uppQDPolyProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  342. enum { uppQDRgnProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  343. enum { uppQDBitsProcInfo = 0x0000EFC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
  344. enum { uppQDCommentProcInfo = 0x00000E80 };                     /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
  345. enum { uppQDTxMeasProcInfo = 0x0000FFA0 };                         /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  346. enum { uppQDGetPicProcInfo = 0x000002C0 };                         /* pascal no_return_value Func(4_bytes, 2_bytes) */
  347. enum { uppQDPutPicProcInfo = 0x000002C0 };                         /* pascal no_return_value Func(4_bytes, 2_bytes) */
  348. enum { uppQDOpcodeProcInfo = 0x00002BC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes) */
  349. enum { uppQDJShieldCursorProcInfo = 0x00002A80 };                 /* pascal no_return_value Func(2_bytes, 2_bytes, 2_bytes, 2_bytes) */
  350. #define NewQDTextProc(userRoutine)                                 (QDTextUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTextProcInfo, GetCurrentArchitecture())
  351. #define NewQDLineProc(userRoutine)                                 (QDLineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDLineProcInfo, GetCurrentArchitecture())
  352. #define NewQDRectProc(userRoutine)                                 (QDRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRectProcInfo, GetCurrentArchitecture())
  353. #define NewQDRRectProc(userRoutine)                             (QDRRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRRectProcInfo, GetCurrentArchitecture())
  354. #define NewQDOvalProc(userRoutine)                                 (QDOvalUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOvalProcInfo, GetCurrentArchitecture())
  355. #define NewQDArcProc(userRoutine)                                 (QDArcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDArcProcInfo, GetCurrentArchitecture())
  356. #define NewQDPolyProc(userRoutine)                                 (QDPolyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPolyProcInfo, GetCurrentArchitecture())
  357. #define NewQDRgnProc(userRoutine)                                 (QDRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRgnProcInfo, GetCurrentArchitecture())
  358. #define NewQDBitsProc(userRoutine)                                 (QDBitsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDBitsProcInfo, GetCurrentArchitecture())
  359. #define NewQDCommentProc(userRoutine)                             (QDCommentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDCommentProcInfo, GetCurrentArchitecture())
  360. #define NewQDTxMeasProc(userRoutine)                             (QDTxMeasUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTxMeasProcInfo, GetCurrentArchitecture())
  361. #define NewQDGetPicProc(userRoutine)                             (QDGetPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDGetPicProcInfo, GetCurrentArchitecture())
  362. #define NewQDPutPicProc(userRoutine)                             (QDPutPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPutPicProcInfo, GetCurrentArchitecture())
  363. #define NewQDOpcodeProc(userRoutine)                             (QDOpcodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOpcodeProcInfo, GetCurrentArchitecture())
  364. #define NewQDJShieldCursorProc(userRoutine)                     (QDJShieldCursorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, GetCurrentArchitecture())
  365. #define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDTextProcInfo, (byteCount), (textBuf), (numer), (denom))
  366. #define CallQDLineProc(userRoutine, newPt)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppQDLineProcInfo, (newPt))
  367. #define CallQDRectProc(userRoutine, verb, r)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDRectProcInfo, (verb), (r))
  368. #define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDRRectProcInfo, (verb), (r), (ovalWidth), (ovalHeight))
  369. #define CallQDOvalProc(userRoutine, verb, r)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDOvalProcInfo, (verb), (r))
  370. #define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDArcProcInfo, (verb), (r), (startAngle), (arcAngle))
  371. #define CallQDPolyProc(userRoutine, verb, poly)                 CALL_TWO_PARAMETER_UPP((userRoutine), uppQDPolyProcInfo, (verb), (poly))
  372. #define CallQDRgnProc(userRoutine, verb, rgn)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDRgnProcInfo, (verb), (rgn))
  373. #define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQDBitsProcInfo, (srcBits), (srcRect), (dstRect), (mode), (maskRgn))
  374. #define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle)  CALL_THREE_PARAMETER_UPP((userRoutine), uppQDCommentProcInfo, (kind), (dataSize), (dataHandle))
  375. #define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denom, info)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQDTxMeasProcInfo, (byteCount), (textAddr), (numer), (denom), (info))
  376. #define CallQDGetPicProc(userRoutine, dataPtr, byteCount)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDGetPicProcInfo, (dataPtr), (byteCount))
  377. #define CallQDPutPicProc(userRoutine, dataPtr, byteCount)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDPutPicProcInfo, (dataPtr), (byteCount))
  378. #define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDOpcodeProcInfo, (fromRect), (toRect), (opcode), (version))
  379. #define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDJShieldCursorProcInfo, (left), (top), (right), (bottom))
  380.  
  381.  
  382. struct GrafPort {
  383.     short                             device;
  384.     BitMap                             portBits;
  385.     Rect                             portRect;
  386.     RgnHandle                         visRgn;
  387.     RgnHandle                         clipRgn;
  388.     Pattern                         bkPat;
  389.     Pattern                         fillPat;
  390.     Point                             pnLoc;
  391.     Point                             pnSize;
  392.     short                             pnMode;
  393.     Pattern                         pnPat;
  394.     short                             pnVis;
  395.     short                             txFont;
  396.     StyleField                         txFace;                        /*StyleField occupies 16-bits, but only first 8-bits are used*/
  397.     short                             txMode;
  398.     short                             txSize;
  399.     Fixed                             spExtra;
  400.     long                             fgColor;
  401.     long                             bkColor;
  402.     short                             colrBit;
  403.     short                             patStretch;
  404.     Handle                             picSave;
  405.     Handle                             rgnSave;
  406.     Handle                             polySave;
  407.     QDProcsPtr                         grafProcs;
  408. };
  409. typedef struct GrafPort GrafPort;
  410.  
  411. typedef GrafPort *                        GrafPtr;
  412.  
  413. /*
  414.  *    This set of definitions "belongs" in Windows.
  415.  *    But, there is a circularity in the headers where Windows includes Controls and
  416.  *    Controls includes Windows. To break the circle, the information
  417.  *    needed by Controls is moved from Windows to Quickdraw.
  418.  */
  419. typedef GrafPtr                         WindowPtr;
  420. typedef WindowPtr                         DialogPtr;
  421. typedef WindowPtr                         WindowRef;
  422. /* DragConstraint constants to pass to DragGray,DragTheRgn, or ConstrainedDragRgn*/
  423. typedef UInt16                             DragConstraint;
  424.  
  425. enum {
  426.     kNoConstraint                = 0,
  427.     kVerticalConstraint            = 1,
  428.     kHorizontalConstraint        = 2
  429. };
  430.  
  431.  
  432. typedef CALLBACK_API( void , DragGrayRgnProcPtr )(void );
  433. /*
  434.  *    Here ends the list of things that "belong" in Windows.
  435.  */
  436.  
  437.  
  438. struct RGBColor {
  439.     unsigned short                     red;                        /*magnitude of red component*/
  440.     unsigned short                     green;                        /*magnitude of green component*/
  441.     unsigned short                     blue;                        /*magnitude of blue component*/
  442. };
  443. typedef struct RGBColor RGBColor;
  444.  
  445. typedef RGBColor *                        RGBColorPtr;
  446. typedef RGBColorPtr *                    RGBColorHdl;
  447. typedef CALLBACK_API( Boolean , ColorSearchProcPtr )(RGBColor *rgb, long *position);
  448. typedef CALLBACK_API( Boolean , ColorComplementProcPtr )(RGBColor *rgb);
  449. typedef STACK_UPP_TYPE(DragGrayRgnProcPtr)                         DragGrayRgnUPP;
  450. typedef STACK_UPP_TYPE(ColorSearchProcPtr)                         ColorSearchUPP;
  451. typedef STACK_UPP_TYPE(ColorComplementProcPtr)                     ColorComplementUPP;
  452. enum { uppDragGrayRgnProcInfo = 0x00000000 };                     /* pascal no_return_value Func() */
  453. enum { uppColorSearchProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  454. enum { uppColorComplementProcInfo = 0x000000D0 };                 /* pascal 1_byte Func(4_bytes) */
  455. #define NewDragGrayRgnProc(userRoutine)                         (DragGrayRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragGrayRgnProcInfo, GetCurrentArchitecture())
  456. #define NewColorSearchProc(userRoutine)                         (ColorSearchUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorSearchProcInfo, GetCurrentArchitecture())
  457. #define NewColorComplementProc(userRoutine)                     (ColorComplementUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorComplementProcInfo, GetCurrentArchitecture())
  458. #define CallDragGrayRgnProc(userRoutine)                         CALL_ZERO_PARAMETER_UPP((userRoutine), uppDragGrayRgnProcInfo)
  459. #define CallColorSearchProc(userRoutine, rgb, position)         CALL_TWO_PARAMETER_UPP((userRoutine), uppColorSearchProcInfo, (rgb), (position))
  460. #define CallColorComplementProc(userRoutine, rgb)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppColorComplementProcInfo, (rgb))
  461. struct ColorSpec {
  462.     short                             value;                        /*index or other value*/
  463.     RGBColor                         rgb;                        /*true color*/
  464. };
  465. typedef struct ColorSpec ColorSpec;
  466.  
  467. typedef ColorSpec *                        ColorSpecPtr;
  468. typedef ColorSpec                         CSpecArray[1];
  469. struct ColorTable {
  470.     long                             ctSeed;                        /*unique identifier for table*/
  471.     short                             ctFlags;                    /*high bit: 0 = PixMap; 1 = device*/
  472.     short                             ctSize;                        /*number of entries in CTTable*/
  473.     CSpecArray                         ctTable;                    /*array [0..0] of ColorSpec*/
  474. };
  475. typedef struct ColorTable ColorTable;
  476.  
  477. typedef ColorTable *                    CTabPtr;
  478. typedef CTabPtr *                        CTabHandle;
  479. struct xColorSpec {
  480.     short                             value;                        /*index or other value*/
  481.     RGBColor                         rgb;                        /*true color*/
  482.     short                             xalpha;
  483. };
  484. typedef struct xColorSpec xColorSpec;
  485.  
  486. typedef xColorSpec *                    xColorSpecPtr;
  487. typedef xColorSpec                         xCSpecArray[1];
  488. struct MatchRec {
  489.     unsigned short                     red;
  490.     unsigned short                     green;
  491.     unsigned short                     blue;
  492.     long                             matchData;
  493. };
  494. typedef struct MatchRec MatchRec;
  495.  
  496. struct PixMap {
  497.     Ptr                             baseAddr;                    /*pointer to pixels*/
  498.     short                             rowBytes;                    /*offset to next line*/
  499.     Rect                             bounds;                        /*encloses bitmap*/
  500.     short                             pmVersion;                    /*pixMap version number*/
  501.     short                             packType;                    /*defines packing format*/
  502.     long                             packSize;                    /*length of pixel data*/
  503.     Fixed                             hRes;                        /*horiz. resolution (ppi)*/
  504.     Fixed                             vRes;                        /*vert. resolution (ppi)*/
  505.     short                             pixelType;                    /*defines pixel type*/
  506.     short                             pixelSize;                    /*# bits in pixel*/
  507.     short                             cmpCount;                    /*# components in pixel*/
  508.     short                             cmpSize;                    /*# bits per component*/
  509.     long                             planeBytes;                    /*offset to next plane*/
  510.     CTabHandle                         pmTable;                    /*color map for this pixMap*/
  511.     long                             pmReserved;                    /*for future use. MUST BE 0*/
  512. };
  513. typedef struct PixMap PixMap;
  514.  
  515. typedef PixMap *                        PixMapPtr;
  516. typedef PixMapPtr *                        PixMapHandle;
  517. struct PixPat {
  518.     short                             patType;                    /*type of pattern*/
  519.     PixMapHandle                     patMap;                        /*the pattern's pixMap*/
  520.     Handle                             patData;                    /*pixmap's data*/
  521.     Handle                             patXData;                    /*expanded Pattern data*/
  522.     short                             patXValid;                    /*flags whether expanded Pattern valid*/
  523.     Handle                             patXMap;                    /*Handle to expanded Pattern data*/
  524.     Pattern                         pat1Data;                    /*old-Style pattern/RGB color*/
  525. };
  526. typedef struct PixPat PixPat;
  527.  
  528. typedef PixPat *                        PixPatPtr;
  529. typedef PixPatPtr *                        PixPatHandle;
  530. struct CCrsr {
  531.     short                             crsrType;                    /*type of cursor*/
  532.     PixMapHandle                     crsrMap;                    /*the cursor's pixmap*/
  533.     Handle                             crsrData;                    /*cursor's data*/
  534.     Handle                             crsrXData;                    /*expanded cursor data*/
  535.     short                             crsrXValid;                    /*depth of expanded data (0 if none)*/
  536.     Handle                             crsrXHandle;                /*future use*/
  537.     Bits16                             crsr1Data;                    /*one-bit cursor*/
  538.     Bits16                             crsrMask;                    /*cursor's mask*/
  539.     Point                             crsrHotSpot;                /*cursor's hotspot*/
  540.     long                             crsrXTable;                    /*private*/
  541.     long                             crsrID;                        /*private*/
  542. };
  543. typedef struct CCrsr CCrsr;
  544.  
  545. typedef CCrsr *                            CCrsrPtr;
  546. typedef CCrsrPtr *                        CCrsrHandle;
  547. #if OLDROUTINELOCATIONS
  548. struct CIcon {
  549.     PixMap                             iconPMap;                    /*the icon's pixMap*/
  550.     BitMap                             iconMask;                    /*the icon's mask*/
  551.     BitMap                             iconBMap;                    /*the icon's bitMap*/
  552.     Handle                             iconData;                    /*the icon's data*/
  553.     short                             iconMaskData[1];            /*icon's mask and BitMap data*/
  554. };
  555. typedef struct CIcon CIcon;
  556.  
  557. typedef CIcon *                            CIconPtr;
  558. typedef CIconPtr *                        CIconHandle;
  559. #endif  /* OLDROUTINELOCATIONS */
  560.  
  561. struct GammaTbl {
  562.     short                             gVersion;                    /*gamma version number*/
  563.     short                             gType;                        /*gamma data type*/
  564.     short                             gFormulaSize;                /*Formula data size*/
  565.     short                             gChanCnt;                    /*number of channels of data*/
  566.     short                             gDataCnt;                    /*number of values/channel*/
  567.     short                             gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  568.     short                             gFormulaData[1];            /*data for formulas followed by gamma values*/
  569. };
  570. typedef struct GammaTbl GammaTbl;
  571.  
  572. typedef GammaTbl *                        GammaTblPtr;
  573. typedef GammaTblPtr *                    GammaTblHandle;
  574. struct ITab {
  575.     long                             iTabSeed;                    /*copy of CTSeed from source CTable*/
  576.     short                             iTabRes;                    /*bits/channel resolution of iTable*/
  577.     Byte                             iTTable[1];                    /*byte colortable index values*/
  578. };
  579. typedef struct ITab ITab;
  580.  
  581. typedef ITab *                            ITabPtr;
  582. typedef ITabPtr *                        ITabHandle;
  583. struct SProcRec {
  584.     Handle                             nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  585.     ColorSearchUPP                     srchProc;                    /*search procedure proc ptr*/
  586. };
  587. typedef struct SProcRec SProcRec;
  588.  
  589. typedef SProcRec *                        SProcPtr;
  590. typedef SProcPtr *                        SProcHndl;
  591. struct CProcRec {
  592.     Handle                             nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  593.     ColorComplementUPP                 compProc;                    /*complement procedure proc ptr*/
  594. };
  595. typedef struct CProcRec CProcRec;
  596.  
  597. typedef CProcRec *                        CProcPtr;
  598. typedef CProcPtr *                        CProcHndl;
  599. struct GDevice {
  600.     short                             gdRefNum;                    /*driver's unit number*/
  601.     short                             gdID;                        /*client ID for search procs*/
  602.     short                             gdType;                        /*fixed/CLUT/direct*/
  603.     ITabHandle                         gdITable;                    /*Handle to inverse lookup table*/
  604.     short                             gdResPref;                    /*preferred resolution of GDITable*/
  605.     SProcHndl                         gdSearchProc;                /*search proc list head*/
  606.     CProcHndl                         gdCompProc;                    /*complement proc list*/
  607.     short                             gdFlags;                    /*grafDevice flags word*/
  608.     PixMapHandle                     gdPMap;                        /*describing pixMap*/
  609.     long                             gdRefCon;                    /*reference value*/
  610.     Handle                             gdNextGD;                    /*GDHandle Handle of next gDevice*/
  611.     Rect                             gdRect;                        /* device's bounds in global coordinates*/
  612.     long                             gdMode;                        /*device's current mode*/
  613.     short                             gdCCBytes;                    /*depth of expanded cursor data*/
  614.     short                             gdCCDepth;                    /*depth of expanded cursor data*/
  615.     Handle                             gdCCXData;                    /*Handle to cursor's expanded data*/
  616.     Handle                             gdCCXMask;                    /*Handle to cursor's expanded mask*/
  617.     long                             gdReserved;                    /*future use. MUST BE 0*/
  618. };
  619. typedef struct GDevice GDevice;
  620.  
  621. typedef GDevice *                        GDPtr;
  622. typedef GDPtr *                            GDHandle;
  623. struct GrafVars {
  624.     RGBColor                         rgbOpColor;                    /*color for addPin  subPin and average*/
  625.     RGBColor                         rgbHiliteColor;                /*color for hiliting*/
  626.     Handle                             pmFgColor;                    /*palette Handle for foreground color*/
  627.     short                             pmFgIndex;                    /*index value for foreground*/
  628.     Handle                             pmBkColor;                    /*palette Handle for background color*/
  629.     short                             pmBkIndex;                    /*index value for background*/
  630.     short                             pmFlags;                    /*flags for Palette Manager*/
  631. };
  632. typedef struct GrafVars GrafVars;
  633.  
  634. typedef GrafVars *                        GVarPtr;
  635. typedef GVarPtr *                        GVarHandle;
  636. struct CQDProcs {
  637.     QDTextUPP                         textProc;
  638.     QDLineUPP                         lineProc;
  639.     QDRectUPP                         rectProc;
  640.     QDRRectUPP                         rRectProc;
  641.     QDOvalUPP                         ovalProc;
  642.     QDArcUPP                         arcProc;
  643.     QDPolyUPP                         polyProc;
  644.     QDRgnUPP                         rgnProc;
  645.     QDBitsUPP                         bitsProc;
  646.     QDCommentUPP                     commentProc;
  647.     QDTxMeasUPP                     txMeasProc;
  648.     QDGetPicUPP                     getPicProc;
  649.     QDPutPicUPP                     putPicProc;
  650.     QDOpcodeUPP                     opcodeProc;                    /*fields added to QDProcs*/
  651.     UniversalProcPtr                 newProc1;
  652.     UniversalProcPtr                 newProc2;
  653.     UniversalProcPtr                 newProc3;
  654.     UniversalProcPtr                 newProc4;
  655.     UniversalProcPtr                 newProc5;
  656.     UniversalProcPtr                 newProc6;
  657. };
  658. typedef struct CQDProcs CQDProcs;
  659.  
  660. typedef CQDProcs *                        CQDProcsPtr;
  661. struct CGrafPort {
  662.     short                             device;
  663.     PixMapHandle                     portPixMap;                    /*port's pixel map*/
  664.     short                             portVersion;                /*high 2 bits always set*/
  665.     Handle                             grafVars;                    /*Handle to more fields*/
  666.     short                             chExtra;                    /*character extra*/
  667.     short                             pnLocHFrac;                    /*pen fraction*/
  668.     Rect                             portRect;
  669.     RgnHandle                         visRgn;
  670.     RgnHandle                         clipRgn;
  671.     PixPatHandle                     bkPixPat;                    /*background pattern*/
  672.     RGBColor                         rgbFgColor;                    /*RGB components of fg*/
  673.     RGBColor                         rgbBkColor;                    /*RGB components of bk*/
  674.     Point                             pnLoc;
  675.     Point                             pnSize;
  676.     short                             pnMode;
  677.     PixPatHandle                     pnPixPat;                    /*pen's pattern*/
  678.     PixPatHandle                     fillPixPat;                    /*fill pattern*/
  679.     short                             pnVis;
  680.     short                             txFont;
  681.     StyleField                         txFace;                        /*StyleField occupies 16-bits, but only first 8-bits are used*/
  682.     short                             txMode;
  683.     short                             txSize;
  684.     Fixed                             spExtra;
  685.     long                             fgColor;
  686.     long                             bkColor;
  687.     short                             colrBit;
  688.     short                             patStretch;
  689.     Handle                             picSave;
  690.     Handle                             rgnSave;
  691.     Handle                             polySave;
  692.     CQDProcsPtr                     grafProcs;
  693. };
  694. typedef struct CGrafPort CGrafPort;
  695.  
  696. typedef CGrafPort *                        CGrafPtr;
  697. typedef CGrafPtr                         CWindowPtr;
  698. struct ReqListRec {
  699.     short                             reqLSize;                    /*request list size*/
  700.     short                             reqLData[1];                /*request list data*/
  701. };
  702. typedef struct ReqListRec ReqListRec;
  703.  
  704. struct OpenCPicParams {
  705.     Rect                             srcRect;
  706.     Fixed                             hRes;
  707.     Fixed                             vRes;
  708.     short                             version;
  709.     short                             reserved1;
  710.     long                             reserved2;
  711. };
  712. typedef struct OpenCPicParams OpenCPicParams;
  713.  
  714.  
  715. enum {
  716.     kCursorImageMajorVersion    = 0x0001,
  717.     kCursorImageMinorVersion    = 0x0000
  718. };
  719.  
  720. struct CursorImageRec {
  721.     UInt16                             majorVersion;
  722.     UInt16                             minorVersion;
  723.     PixMapHandle                     cursorPixMap;
  724.     BitMapHandle                     cursorBitMask;
  725. };
  726. typedef struct CursorImageRec CursorImageRec;
  727.  
  728. typedef CursorImageRec *                CursorImagePtr;
  729. typedef CALLBACK_API( void , DeviceLoopDrawingProcPtr )(short depth, short deviceFlags, GDHandle targetDevice, long userData);
  730. typedef STACK_UPP_TYPE(DeviceLoopDrawingProcPtr)                 DeviceLoopDrawingUPP;
  731. enum { uppDeviceLoopDrawingProcInfo = 0x00003E80 };             /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  732. #define NewDeviceLoopDrawingProc(userRoutine)                     (DeviceLoopDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeviceLoopDrawingProcInfo, GetCurrentArchitecture())
  733. #define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDeviceLoopDrawingProcInfo, (depth), (deviceFlags), (targetDevice), (userData))
  734. struct QDGlobals {
  735.     char                             privates[76];
  736.     long                             randSeed;
  737.     BitMap                             screenBits;
  738.     Cursor                             arrow;
  739.     Pattern                         dkGray;
  740.     Pattern                         ltGray;
  741.     Pattern                         gray;
  742.     Pattern                         black;
  743.     Pattern                         white;
  744.     GrafPtr                         thePort;
  745. };
  746. typedef struct QDGlobals QDGlobals;
  747.  
  748. typedef QDGlobals *                        QDGlobalsPtr;
  749. typedef QDGlobalsPtr *                    QDGlobalsHdl;
  750. extern QDGlobals qd;
  751.  
  752.  
  753.  
  754. EXTERN_API( void )
  755. InitGraf                        (void *                    globalPtr)                            ONEWORDINLINE(0xA86E);
  756.  
  757. EXTERN_API( void )
  758. OpenPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA86F);
  759.  
  760. EXTERN_API( void )
  761. InitPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA86D);
  762.  
  763. EXTERN_API( void )
  764. ClosePort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA87D);
  765.  
  766. EXTERN_API( void )
  767. SetPort                            (GrafPtr                 port)                                ONEWORDINLINE(0xA873);
  768.  
  769. EXTERN_API( void )
  770. GetPort                            (GrafPtr *                port)                                ONEWORDINLINE(0xA874);
  771.  
  772. EXTERN_API( void )
  773. GrafDevice                        (short                     device)                                ONEWORDINLINE(0xA872);
  774.  
  775. EXTERN_API( void )
  776. SetPortBits                        (const BitMap *            bm)                                    ONEWORDINLINE(0xA875);
  777.  
  778. EXTERN_API( void )
  779. PortSize                        (short                     width,
  780.                                  short                     height)                                ONEWORDINLINE(0xA876);
  781.  
  782. EXTERN_API( void )
  783. MovePortTo                        (short                     leftGlobal,
  784.                                  short                     topGlobal)                            ONEWORDINLINE(0xA877);
  785.  
  786. EXTERN_API( void )
  787. SetOrigin                        (short                     h,
  788.                                  short                     v)                                    ONEWORDINLINE(0xA878);
  789.  
  790. EXTERN_API( void )
  791. SetClip                            (RgnHandle                 rgn)                                ONEWORDINLINE(0xA879);
  792.  
  793. EXTERN_API( void )
  794. GetClip                            (RgnHandle                 rgn)                                ONEWORDINLINE(0xA87A);
  795.  
  796. EXTERN_API( void )
  797. ClipRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA87B);
  798.  
  799. EXTERN_API( void )
  800. BackPat                            (const Pattern *        pat)                                ONEWORDINLINE(0xA87C);
  801.  
  802. EXTERN_API( void )
  803. InitCursor                        (void)                                                        ONEWORDINLINE(0xA850);
  804.  
  805. EXTERN_API( void )
  806. SetCursor                        (const Cursor *            crsr)                                ONEWORDINLINE(0xA851);
  807.  
  808. EXTERN_API( void )
  809. HideCursor                        (void)                                                        ONEWORDINLINE(0xA852);
  810.  
  811. EXTERN_API( void )
  812. ShowCursor                        (void)                                                        ONEWORDINLINE(0xA853);
  813.  
  814. EXTERN_API( void )
  815. ObscureCursor                    (void)                                                        ONEWORDINLINE(0xA856);
  816.  
  817. EXTERN_API( void )
  818. HidePen                            (void)                                                        ONEWORDINLINE(0xA896);
  819.  
  820. EXTERN_API( void )
  821. ShowPen                            (void)                                                        ONEWORDINLINE(0xA897);
  822.  
  823. EXTERN_API( void )
  824. GetPen                            (Point *                pt)                                    ONEWORDINLINE(0xA89A);
  825.  
  826. EXTERN_API( void )
  827. GetPenState                        (PenState *                pnState)                            ONEWORDINLINE(0xA898);
  828.  
  829. EXTERN_API( void )
  830. SetPenState                        (const PenState *        pnState)                            ONEWORDINLINE(0xA899);
  831.  
  832. EXTERN_API( void )
  833. PenSize                            (short                     width,
  834.                                  short                     height)                                ONEWORDINLINE(0xA89B);
  835.  
  836. EXTERN_API( void )
  837. PenMode                            (short                     mode)                                ONEWORDINLINE(0xA89C);
  838.  
  839. EXTERN_API( void )
  840. PenPat                            (const Pattern *        pat)                                ONEWORDINLINE(0xA89D);
  841.  
  842. EXTERN_API( void )
  843. PenNormal                        (void)                                                        ONEWORDINLINE(0xA89E);
  844.  
  845. EXTERN_API( void )
  846. MoveTo                            (short                     h,
  847.                                  short                     v)                                    ONEWORDINLINE(0xA893);
  848.  
  849. EXTERN_API( void )
  850. Move                            (short                     dh,
  851.                                  short                     dv)                                    ONEWORDINLINE(0xA894);
  852.  
  853. EXTERN_API( void )
  854. LineTo                            (short                     h,
  855.                                  short                     v)                                    ONEWORDINLINE(0xA891);
  856.  
  857. EXTERN_API( void )
  858. Line                            (short                     dh,
  859.                                  short                     dv)                                    ONEWORDINLINE(0xA892);
  860.  
  861. EXTERN_API( void )
  862. ForeColor                        (long                     color)                                ONEWORDINLINE(0xA862);
  863.  
  864. EXTERN_API( void )
  865. BackColor                        (long                     color)                                ONEWORDINLINE(0xA863);
  866.  
  867. EXTERN_API( void )
  868. ColorBit                        (short                     whichBit)                            ONEWORDINLINE(0xA864);
  869.  
  870. EXTERN_API( void )
  871. SetRect                            (Rect *                    r,
  872.                                  short                     left,
  873.                                  short                     top,
  874.                                  short                     right,
  875.                                  short                     bottom)                                ONEWORDINLINE(0xA8A7);
  876.  
  877. EXTERN_API( void )
  878. OffsetRect                        (Rect *                    r,
  879.                                  short                     dh,
  880.                                  short                     dv)                                    ONEWORDINLINE(0xA8A8);
  881.  
  882. EXTERN_API( void )
  883. InsetRect                        (Rect *                    r,
  884.                                  short                     dh,
  885.                                  short                     dv)                                    ONEWORDINLINE(0xA8A9);
  886.  
  887. EXTERN_API( Boolean )
  888. SectRect                        (const Rect *            src1,
  889.                                  const Rect *            src2,
  890.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AA);
  891.  
  892. EXTERN_API( void )
  893. UnionRect                        (const Rect *            src1,
  894.                                  const Rect *            src2,
  895.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AB);
  896.  
  897. EXTERN_API( Boolean )
  898. EqualRect                        (const Rect *            rect1,
  899.                                  const Rect *            rect2)                                ONEWORDINLINE(0xA8A6);
  900.  
  901. EXTERN_API( Boolean )
  902. EmptyRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8AE);
  903.  
  904. EXTERN_API( void )
  905. FrameRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A1);
  906.  
  907. EXTERN_API( void )
  908. PaintRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A2);
  909.  
  910. EXTERN_API( void )
  911. EraseRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A3);
  912.  
  913. EXTERN_API( void )
  914. InvertRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A4);
  915.  
  916. EXTERN_API( void )
  917. FillRect                        (const Rect *            r,
  918.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8A5);
  919.  
  920. EXTERN_API( void )
  921. FrameOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B7);
  922.  
  923. EXTERN_API( void )
  924. PaintOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B8);
  925.  
  926. EXTERN_API( void )
  927. EraseOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B9);
  928.  
  929. EXTERN_API( void )
  930. InvertOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8BA);
  931.  
  932. EXTERN_API( void )
  933. FillOval                        (const Rect *            r,
  934.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8BB);
  935.  
  936. EXTERN_API( void )
  937. FrameRoundRect                    (const Rect *            r,
  938.                                  short                     ovalWidth,
  939.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B0);
  940.  
  941. EXTERN_API( void )
  942. PaintRoundRect                    (const Rect *            r,
  943.                                  short                     ovalWidth,
  944.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B1);
  945.  
  946. EXTERN_API( void )
  947. EraseRoundRect                    (const Rect *            r,
  948.                                  short                     ovalWidth,
  949.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B2);
  950.  
  951. EXTERN_API( void )
  952. InvertRoundRect                    (const Rect *            r,
  953.                                  short                     ovalWidth,
  954.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B3);
  955.  
  956. EXTERN_API( void )
  957. FillRoundRect                    (const Rect *            r,
  958.                                  short                     ovalWidth,
  959.                                  short                     ovalHeight,
  960.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8B4);
  961.  
  962. EXTERN_API( void )
  963. FrameArc                        (const Rect *            r,
  964.                                  short                     startAngle,
  965.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BE);
  966.  
  967. EXTERN_API( void )
  968. PaintArc                        (const Rect *            r,
  969.                                  short                     startAngle,
  970.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BF);
  971.  
  972. EXTERN_API( void )
  973. EraseArc                        (const Rect *            r,
  974.                                  short                     startAngle,
  975.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8C0);
  976.  
  977. EXTERN_API( void )
  978. InvertArc                        (const Rect *            r,
  979.                                  short                     startAngle,
  980.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8C1);
  981.  
  982. EXTERN_API( void )
  983. FillArc                            (const Rect *            r,
  984.                                  short                     startAngle,
  985.                                  short                     arcAngle,
  986.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8C2);
  987.  
  988. EXTERN_API( RgnHandle )
  989. NewRgn                            (void)                                                        ONEWORDINLINE(0xA8D8);
  990.  
  991. EXTERN_API( void )
  992. OpenRgn                            (void)                                                        ONEWORDINLINE(0xA8DA);
  993.  
  994. EXTERN_API( void )
  995. CloseRgn                        (RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8DB);
  996.  
  997. EXTERN_API( OSErr )
  998. BitMapToRegion                    (RgnHandle                 region,
  999.                                  const BitMap *            bMap)                                ONEWORDINLINE(0xA8D7);
  1000.  
  1001. EXTERN_API( void )
  1002. DisposeRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D9);
  1003.  
  1004. EXTERN_API( void )
  1005. CopyRgn                            (RgnHandle                 srcRgn,
  1006.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8DC);
  1007.  
  1008. EXTERN_API( void )
  1009. SetEmptyRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8DD);
  1010.  
  1011. EXTERN_API( void )
  1012. SetRectRgn                        (RgnHandle                 rgn,
  1013.                                  short                     left,
  1014.                                  short                     top,
  1015.                                  short                     right,
  1016.                                  short                     bottom)                                ONEWORDINLINE(0xA8DE);
  1017.  
  1018. EXTERN_API( void )
  1019. RectRgn                            (RgnHandle                 rgn,
  1020.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8DF);
  1021.  
  1022. EXTERN_API( void )
  1023. OffsetRgn                        (RgnHandle                 rgn,
  1024.                                  short                     dh,
  1025.                                  short                     dv)                                    ONEWORDINLINE(0xA8E0);
  1026.  
  1027. EXTERN_API( void )
  1028. InsetRgn                        (RgnHandle                 rgn,
  1029.                                  short                     dh,
  1030.                                  short                     dv)                                    ONEWORDINLINE(0xA8E1);
  1031.  
  1032. EXTERN_API( void )
  1033. SectRgn                            (RgnHandle                 srcRgnA,
  1034.                                  RgnHandle                 srcRgnB,
  1035.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E4);
  1036.  
  1037. EXTERN_API( void )
  1038. UnionRgn                        (RgnHandle                 srcRgnA,
  1039.                                  RgnHandle                 srcRgnB,
  1040.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E5);
  1041.  
  1042. EXTERN_API( void )
  1043. DiffRgn                            (RgnHandle                 srcRgnA,
  1044.                                  RgnHandle                 srcRgnB,
  1045.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E6);
  1046.  
  1047. EXTERN_API( void )
  1048. XorRgn                            (RgnHandle                 srcRgnA,
  1049.                                  RgnHandle                 srcRgnB,
  1050.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E7);
  1051.  
  1052. EXTERN_API( Boolean )
  1053. RectInRgn                        (const Rect *            r,
  1054.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E9);
  1055.  
  1056. EXTERN_API( Boolean )
  1057. EqualRgn                        (RgnHandle                 rgnA,
  1058.                                  RgnHandle                 rgnB)                                ONEWORDINLINE(0xA8E3);
  1059.  
  1060. EXTERN_API( Boolean )
  1061. EmptyRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E2);
  1062.  
  1063. EXTERN_API( void )
  1064. FrameRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D2);
  1065.  
  1066. EXTERN_API( void )
  1067. PaintRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D3);
  1068.  
  1069. EXTERN_API( void )
  1070. EraseRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D4);
  1071.  
  1072. EXTERN_API( void )
  1073. InvertRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D5);
  1074.  
  1075. EXTERN_API( void )
  1076. FillRgn                            (RgnHandle                 rgn,
  1077.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8D6);
  1078.  
  1079. EXTERN_API( void )
  1080. ScrollRect                        (const Rect *            r,
  1081.                                  short                     dh,
  1082.                                  short                     dv,
  1083.                                  RgnHandle                 updateRgn)                            ONEWORDINLINE(0xA8EF);
  1084.  
  1085. EXTERN_API( void )
  1086. CopyBits                        (const BitMap *            srcBits,
  1087.                                  const BitMap *            dstBits,
  1088.                                  const Rect *            srcRect,
  1089.                                  const Rect *            dstRect,
  1090.                                  short                     mode,
  1091.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xA8EC);
  1092.  
  1093. EXTERN_API( void )
  1094. SeedFill                        (const void *            srcPtr,
  1095.                                  void *                    dstPtr,
  1096.                                  short                     srcRow,
  1097.                                  short                     dstRow,
  1098.                                  short                     height,
  1099.                                  short                     words,
  1100.                                  short                     seedH,
  1101.                                  short                     seedV)                                ONEWORDINLINE(0xA839);
  1102.  
  1103. EXTERN_API( void )
  1104. CalcMask                        (const void *            srcPtr,
  1105.                                  void *                    dstPtr,
  1106.                                  short                     srcRow,
  1107.                                  short                     dstRow,
  1108.                                  short                     height,
  1109.                                  short                     words)                                ONEWORDINLINE(0xA838);
  1110.  
  1111. EXTERN_API( void )
  1112. CopyMask                        (const BitMap *            srcBits,
  1113.                                  const BitMap *            maskBits,
  1114.                                  const BitMap *            dstBits,
  1115.                                  const Rect *            srcRect,
  1116.                                  const Rect *            maskRect,
  1117.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA817);
  1118.  
  1119. EXTERN_API( PicHandle )
  1120. OpenPicture                        (const Rect *            picFrame)                            ONEWORDINLINE(0xA8F3);
  1121.  
  1122. EXTERN_API( void )
  1123. PicComment                        (short                     kind,
  1124.                                  short                     dataSize,
  1125.                                  Handle                 dataHandle)                            ONEWORDINLINE(0xA8F2);
  1126.  
  1127. EXTERN_API( void )
  1128. ClosePicture                    (void)                                                        ONEWORDINLINE(0xA8F4);
  1129.  
  1130. EXTERN_API( void )
  1131. DrawPicture                        (PicHandle                 myPicture,
  1132.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F6);
  1133.  
  1134. EXTERN_API( void )
  1135. KillPicture                        (PicHandle                 myPicture)                            ONEWORDINLINE(0xA8F5);
  1136.  
  1137. EXTERN_API( PolyHandle )
  1138. OpenPoly                        (void)                                                        ONEWORDINLINE(0xA8CB);
  1139.  
  1140. EXTERN_API( void )
  1141. ClosePoly                        (void)                                                        ONEWORDINLINE(0xA8CC);
  1142.  
  1143. EXTERN_API( void )
  1144. KillPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8CD);
  1145.  
  1146. EXTERN_API( void )
  1147. OffsetPoly                        (PolyHandle             poly,
  1148.                                  short                     dh,
  1149.                                  short                     dv)                                    ONEWORDINLINE(0xA8CE);
  1150.  
  1151. EXTERN_API( void )
  1152. FramePoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C6);
  1153.  
  1154. EXTERN_API( void )
  1155. PaintPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C7);
  1156.  
  1157. EXTERN_API( void )
  1158. ErasePoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C8);
  1159.  
  1160. EXTERN_API( void )
  1161. InvertPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C9);
  1162.  
  1163. EXTERN_API( void )
  1164. FillPoly                        (PolyHandle             poly,
  1165.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8CA);
  1166.  
  1167. EXTERN_API( void )
  1168. SetPt                            (Point *                pt,
  1169.                                  short                     h,
  1170.                                  short                     v)                                    ONEWORDINLINE(0xA880);
  1171.  
  1172. EXTERN_API( void )
  1173. LocalToGlobal                    (Point *                pt)                                    ONEWORDINLINE(0xA870);
  1174.  
  1175. EXTERN_API( void )
  1176. GlobalToLocal                    (Point *                pt)                                    ONEWORDINLINE(0xA871);
  1177.  
  1178. EXTERN_API( short )
  1179. Random                            (void)                                                        ONEWORDINLINE(0xA861);
  1180.  
  1181. EXTERN_API( void )
  1182. StuffHex                        (void *                    thingPtr,
  1183.                                  ConstStr255Param         s)                                    ONEWORDINLINE(0xA866);
  1184.  
  1185. EXTERN_API( Boolean )
  1186. GetPixel                        (short                     h,
  1187.                                  short                     v)                                    ONEWORDINLINE(0xA865);
  1188.  
  1189. EXTERN_API( void )
  1190. ScalePt                            (Point *                pt,
  1191.                                  const Rect *            srcRect,
  1192.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F8);
  1193.  
  1194. EXTERN_API( void )
  1195. MapPt                            (Point *                pt,
  1196.                                  const Rect *            srcRect,
  1197.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F9);
  1198.  
  1199. EXTERN_API( void )
  1200. MapRect                            (Rect *                    r,
  1201.                                  const Rect *            srcRect,
  1202.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FA);
  1203.  
  1204. EXTERN_API( void )
  1205. MapRgn                            (RgnHandle                 rgn,
  1206.                                  const Rect *            srcRect,
  1207.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FB);
  1208.  
  1209. EXTERN_API( void )
  1210. MapPoly                            (PolyHandle             poly,
  1211.                                  const Rect *            srcRect,
  1212.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FC);
  1213.  
  1214. EXTERN_API( void )
  1215. SetStdProcs                        (QDProcs *                procs)                                ONEWORDINLINE(0xA8EA);
  1216.  
  1217. EXTERN_API( void )
  1218. StdRect                            (GrafVerb                 verb,
  1219.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8A0);
  1220.  
  1221. EXTERN_API( void )
  1222. StdRRect                        (GrafVerb                 verb,
  1223.                                  const Rect *            r,
  1224.                                  short                     ovalWidth,
  1225.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8AF);
  1226.  
  1227. EXTERN_API( void )
  1228. StdOval                            (GrafVerb                 verb,
  1229.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8B6);
  1230.  
  1231. EXTERN_API( void )
  1232. StdArc                            (GrafVerb                 verb,
  1233.                                  const Rect *            r,
  1234.                                  short                     startAngle,
  1235.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BD);
  1236.  
  1237. EXTERN_API( void )
  1238. StdPoly                            (GrafVerb                 verb,
  1239.                                  PolyHandle             poly)                                ONEWORDINLINE(0xA8C5);
  1240.  
  1241. EXTERN_API( void )
  1242. StdRgn                            (GrafVerb                 verb,
  1243.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D1);
  1244.  
  1245. EXTERN_API( void )
  1246. StdBits                            (const BitMap *            srcBits,
  1247.                                  const Rect *            srcRect,
  1248.                                  const Rect *            dstRect,
  1249.                                  short                     mode,
  1250.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xA8EB);
  1251.  
  1252. EXTERN_API( void )
  1253. StdComment                        (short                     kind,
  1254.                                  short                     dataSize,
  1255.                                  Handle                 dataHandle)                            ONEWORDINLINE(0xA8F1);
  1256.  
  1257. EXTERN_API( void )
  1258. StdGetPic                        (void *                    dataPtr,
  1259.                                  short                     byteCount)                            ONEWORDINLINE(0xA8EE);
  1260.  
  1261. EXTERN_API( void )
  1262. StdPutPic                        (const void *            dataPtr,
  1263.                                  short                     byteCount)                            ONEWORDINLINE(0xA8F0);
  1264.  
  1265. EXTERN_API( void )
  1266. StdOpcode                        (const Rect *            fromRect,
  1267.                                  const Rect *            toRect,
  1268.                                  UInt16                 opcode,
  1269.                                  SInt16                 version)                            ONEWORDINLINE(0xABF8);
  1270.  
  1271. EXTERN_API( void )
  1272. AddPt                            (Point                     src,
  1273.                                  Point *                dst)                                ONEWORDINLINE(0xA87E);
  1274.  
  1275. EXTERN_API( Boolean )
  1276. EqualPt                            (Point                     pt1,
  1277.                                  Point                     pt2)                                ONEWORDINLINE(0xA881);
  1278.  
  1279. EXTERN_API( Boolean )
  1280. PtInRect                        (Point                     pt,
  1281.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8AD);
  1282.  
  1283. EXTERN_API( void )
  1284. Pt2Rect                            (Point                     pt1,
  1285.                                  Point                     pt2,
  1286.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AC);
  1287.  
  1288. EXTERN_API( void )
  1289. PtToAngle                        (const Rect *            r,
  1290.                                  Point                     pt,
  1291.                                  short *                angle)                                ONEWORDINLINE(0xA8C3);
  1292.  
  1293. EXTERN_API( void )
  1294. SubPt                            (Point                     src,
  1295.                                  Point *                dst)                                ONEWORDINLINE(0xA87F);
  1296.  
  1297. EXTERN_API( Boolean )
  1298. PtInRgn                            (Point                     pt,
  1299.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E8);
  1300.  
  1301. EXTERN_API( void )
  1302. StdLine                            (Point                     newPt)                                ONEWORDINLINE(0xA890);
  1303.  
  1304. EXTERN_API( void )
  1305. OpenCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA00);
  1306.  
  1307. EXTERN_API( void )
  1308. InitCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA01);
  1309.  
  1310. EXTERN_API( void )
  1311. CloseCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA02);
  1312.  
  1313. EXTERN_API( PixMapHandle )
  1314. NewPixMap                        (void)                                                        ONEWORDINLINE(0xAA03);
  1315.  
  1316. EXTERN_API( void )
  1317. DisposePixMap                    (PixMapHandle             pm)                                    ONEWORDINLINE(0xAA04);
  1318.  
  1319. EXTERN_API( void )
  1320. CopyPixMap                        (PixMapHandle             srcPM,
  1321.                                  PixMapHandle             dstPM)                                ONEWORDINLINE(0xAA05);
  1322.  
  1323. EXTERN_API( PixPatHandle )
  1324. NewPixPat                        (void)                                                        ONEWORDINLINE(0xAA07);
  1325.  
  1326. EXTERN_API( void )
  1327. DisposePixPat                    (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA08);
  1328.  
  1329. EXTERN_API( void )
  1330. CopyPixPat                        (PixPatHandle             srcPP,
  1331.                                  PixPatHandle             dstPP)                                ONEWORDINLINE(0xAA09);
  1332.  
  1333. EXTERN_API( void )
  1334. PenPixPat                        (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0A);
  1335.  
  1336. EXTERN_API( void )
  1337. BackPixPat                        (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0B);
  1338.  
  1339. EXTERN_API( PixPatHandle )
  1340. GetPixPat                        (short                     patID)                                ONEWORDINLINE(0xAA0C);
  1341.  
  1342. EXTERN_API( void )
  1343. MakeRGBPat                        (PixPatHandle             pp,
  1344.                                  const RGBColor *        myColor)                            ONEWORDINLINE(0xAA0D);
  1345.  
  1346. EXTERN_API( void )
  1347. FillCRect                        (const Rect *            r,
  1348.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0E);
  1349.  
  1350. EXTERN_API( void )
  1351. FillCOval                        (const Rect *            r,
  1352.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0F);
  1353.  
  1354. EXTERN_API( void )
  1355. FillCRoundRect                    (const Rect *            r,
  1356.                                  short                     ovalWidth,
  1357.                                  short                     ovalHeight,
  1358.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA10);
  1359.  
  1360. EXTERN_API( void )
  1361. FillCArc                        (const Rect *            r,
  1362.                                  short                     startAngle,
  1363.                                  short                     arcAngle,
  1364.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA11);
  1365.  
  1366. EXTERN_API( void )
  1367. FillCRgn                        (RgnHandle                 rgn,
  1368.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA12);
  1369.  
  1370. EXTERN_API( void )
  1371. FillCPoly                        (PolyHandle             poly,
  1372.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA13);
  1373.  
  1374. EXTERN_API( void )
  1375. RGBForeColor                    (const RGBColor *        color)                                ONEWORDINLINE(0xAA14);
  1376.  
  1377. EXTERN_API( void )
  1378. RGBBackColor                    (const RGBColor *        color)                                ONEWORDINLINE(0xAA15);
  1379.  
  1380. EXTERN_API( void )
  1381. SetCPixel                        (short                     h,
  1382.                                  short                     v,
  1383.                                  const RGBColor *        cPix)                                ONEWORDINLINE(0xAA16);
  1384.  
  1385. EXTERN_API( void )
  1386. SetPortPix                        (PixMapHandle             pm)                                    ONEWORDINLINE(0xAA06);
  1387.  
  1388. EXTERN_API( void )
  1389. GetCPixel                        (short                     h,
  1390.                                  short                     v,
  1391.                                  RGBColor *                cPix)                                ONEWORDINLINE(0xAA17);
  1392.  
  1393. EXTERN_API( void )
  1394. GetForeColor                    (RGBColor *                color)                                ONEWORDINLINE(0xAA19);
  1395.  
  1396. EXTERN_API( void )
  1397. GetBackColor                    (RGBColor *                color)                                ONEWORDINLINE(0xAA1A);
  1398.  
  1399. EXTERN_API( void )
  1400. SeedCFill                        (const BitMap *            srcBits,
  1401.                                  const BitMap *            dstBits,
  1402.                                  const Rect *            srcRect,
  1403.                                  const Rect *            dstRect,
  1404.                                  short                     seedH,
  1405.                                  short                     seedV,
  1406.                                  ColorSearchUPP         matchProc,
  1407.                                  long                     matchData)                            ONEWORDINLINE(0xAA50);
  1408.  
  1409. EXTERN_API( void )
  1410. CalcCMask                        (const BitMap *            srcBits,
  1411.                                  const BitMap *            dstBits,
  1412.                                  const Rect *            srcRect,
  1413.                                  const Rect *            dstRect,
  1414.                                  const RGBColor *        seedRGB,
  1415.                                  ColorSearchUPP         matchProc,
  1416.                                  long                     matchData)                            ONEWORDINLINE(0xAA4F);
  1417.  
  1418. EXTERN_API( PicHandle )
  1419. OpenCPicture                    (const OpenCPicParams *    newHeader)                            ONEWORDINLINE(0xAA20);
  1420.  
  1421. EXTERN_API( void )
  1422. OpColor                            (const RGBColor *        color)                                ONEWORDINLINE(0xAA21);
  1423.  
  1424. EXTERN_API( void )
  1425. HiliteColor                        (const RGBColor *        color)                                ONEWORDINLINE(0xAA22);
  1426.  
  1427. EXTERN_API( void )
  1428. DisposeCTable                    (CTabHandle             cTable)                                ONEWORDINLINE(0xAA24);
  1429.  
  1430. EXTERN_API( CTabHandle )
  1431. GetCTable                        (short                     ctID)                                ONEWORDINLINE(0xAA18);
  1432.  
  1433. EXTERN_API( CCrsrHandle )
  1434. GetCCursor                        (short                     crsrID)                                ONEWORDINLINE(0xAA1B);
  1435.  
  1436. EXTERN_API( void )
  1437. SetCCursor                        (CCrsrHandle             cCrsr)                                ONEWORDINLINE(0xAA1C);
  1438.  
  1439. EXTERN_API( void )
  1440. AllocCursor                        (void)                                                        ONEWORDINLINE(0xAA1D);
  1441.  
  1442. EXTERN_API( void )
  1443. DisposeCCursor                    (CCrsrHandle             cCrsr)                                ONEWORDINLINE(0xAA26);
  1444.  
  1445. #if OLDROUTINELOCATIONS
  1446. EXTERN_API( CIconHandle )
  1447. GetCIcon                        (short                     iconID)                                ONEWORDINLINE(0xAA1E);
  1448.  
  1449. EXTERN_API( void )
  1450. PlotCIcon                        (const Rect *            theRect,
  1451.                                  CIconHandle             theIcon)                            ONEWORDINLINE(0xAA1F);
  1452.  
  1453. EXTERN_API( void )
  1454. DisposeCIcon                    (CIconHandle             theIcon)                            ONEWORDINLINE(0xAA25);
  1455.  
  1456. #endif  /* OLDROUTINELOCATIONS */
  1457.  
  1458. EXTERN_API( void )
  1459. SetStdCProcs                    (CQDProcs *                procs)                                ONEWORDINLINE(0xAA4E);
  1460.  
  1461. EXTERN_API( GDHandle )
  1462. GetMaxDevice                    (const Rect *            globalRect)                            ONEWORDINLINE(0xAA27);
  1463.  
  1464. EXTERN_API( long )
  1465. GetCTSeed                        (void)                                                        ONEWORDINLINE(0xAA28);
  1466.  
  1467. EXTERN_API( GDHandle )
  1468. GetDeviceList                    (void)                                                        ONEWORDINLINE(0xAA29);
  1469.  
  1470. EXTERN_API( GDHandle )
  1471. GetMainDevice                    (void)                                                        ONEWORDINLINE(0xAA2A);
  1472.  
  1473. EXTERN_API( GDHandle )
  1474. GetNextDevice                    (GDHandle                 curDevice)                            ONEWORDINLINE(0xAA2B);
  1475.  
  1476. EXTERN_API( Boolean )
  1477. TestDeviceAttribute                (GDHandle                 gdh,
  1478.                                  short                     attribute)                            ONEWORDINLINE(0xAA2C);
  1479.  
  1480. EXTERN_API( void )
  1481. SetDeviceAttribute                (GDHandle                 gdh,
  1482.                                  short                     attribute,
  1483.                                  Boolean                 value)                                ONEWORDINLINE(0xAA2D);
  1484.  
  1485. EXTERN_API( void )
  1486. InitGDevice                        (short                     qdRefNum,
  1487.                                  long                     mode,
  1488.                                  GDHandle                 gdh)                                ONEWORDINLINE(0xAA2E);
  1489.  
  1490. EXTERN_API( GDHandle )
  1491. NewGDevice                        (short                     refNum,
  1492.                                  long                     mode)                                ONEWORDINLINE(0xAA2F);
  1493.  
  1494. EXTERN_API( void )
  1495. DisposeGDevice                    (GDHandle                 gdh)                                ONEWORDINLINE(0xAA30);
  1496.  
  1497. EXTERN_API( void )
  1498. SetGDevice                        (GDHandle                 gd)                                    ONEWORDINLINE(0xAA31);
  1499.  
  1500. EXTERN_API( GDHandle )
  1501. GetGDevice                        (void)                                                        ONEWORDINLINE(0xAA32);
  1502.  
  1503. EXTERN_API( long )
  1504. Color2Index                        (const RGBColor *        myColor)                            ONEWORDINLINE(0xAA33);
  1505.  
  1506. EXTERN_API( void )
  1507. Index2Color                        (long                     index,
  1508.                                  RGBColor *                aColor)                                ONEWORDINLINE(0xAA34);
  1509.  
  1510. EXTERN_API( void )
  1511. InvertColor                        (RGBColor *                myColor)                            ONEWORDINLINE(0xAA35);
  1512.  
  1513. EXTERN_API( Boolean )
  1514. RealColor                        (const RGBColor *        color)                                ONEWORDINLINE(0xAA36);
  1515.  
  1516. EXTERN_API( void )
  1517. GetSubTable                        (CTabHandle             myColors,
  1518.                                  short                     iTabRes,
  1519.                                  CTabHandle             targetTbl)                            ONEWORDINLINE(0xAA37);
  1520.  
  1521. EXTERN_API( void )
  1522. MakeITable                        (CTabHandle             cTabH,
  1523.                                  ITabHandle             iTabH,
  1524.                                  short                     res)                                ONEWORDINLINE(0xAA39);
  1525.  
  1526. EXTERN_API( void )
  1527. AddSearch                        (ColorSearchUPP         searchProc)                            ONEWORDINLINE(0xAA3A);
  1528.  
  1529. EXTERN_API( void )
  1530. AddComp                            (ColorComplementUPP     compProc)                            ONEWORDINLINE(0xAA3B);
  1531.  
  1532. EXTERN_API( void )
  1533. DelSearch                        (ColorSearchUPP         searchProc)                            ONEWORDINLINE(0xAA4C);
  1534.  
  1535. EXTERN_API( void )
  1536. DelComp                            (ColorComplementUPP     compProc)                            ONEWORDINLINE(0xAA4D);
  1537.  
  1538. EXTERN_API( void )
  1539. SetClientID                        (short                     id)                                    ONEWORDINLINE(0xAA3C);
  1540.  
  1541. EXTERN_API( void )
  1542. ProtectEntry                    (short                     index,
  1543.                                  Boolean                 protect)                            ONEWORDINLINE(0xAA3D);
  1544.  
  1545. EXTERN_API( void )
  1546. ReserveEntry                    (short                     index,
  1547.                                  Boolean                 reserve)                            ONEWORDINLINE(0xAA3E);
  1548.  
  1549. EXTERN_API( void )
  1550. SetEntries                        (short                     start,
  1551.                                  short                     count,
  1552.                                  CSpecArray             aTable)                                ONEWORDINLINE(0xAA3F);
  1553.  
  1554. EXTERN_API( void )
  1555. SaveEntries                        (CTabHandle             srcTable,
  1556.                                  CTabHandle             resultTable,
  1557.                                  ReqListRec *            selection)                            ONEWORDINLINE(0xAA49);
  1558.  
  1559. EXTERN_API( void )
  1560. RestoreEntries                    (CTabHandle             srcTable,
  1561.                                  CTabHandle             dstTable,
  1562.                                  ReqListRec *            selection)                            ONEWORDINLINE(0xAA4A);
  1563.  
  1564. EXTERN_API( short )
  1565. QDError                            (void)                                                        ONEWORDINLINE(0xAA40);
  1566.  
  1567. EXTERN_API( void )
  1568. CopyDeepMask                    (const BitMap *            srcBits,
  1569.                                  const BitMap *            maskBits,
  1570.                                  const BitMap *            dstBits,
  1571.                                  const Rect *            srcRect,
  1572.                                  const Rect *            maskRect,
  1573.                                  const Rect *            dstRect,
  1574.                                  short                     mode,
  1575.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xAA51);
  1576.  
  1577. EXTERN_API( void )
  1578. DeviceLoop                        (RgnHandle                 drawingRgn,
  1579.                                  DeviceLoopDrawingUPP     drawingProc,
  1580.                                  long                     userData,
  1581.                                  DeviceLoopFlags         flags)                                ONEWORDINLINE(0xABCA);
  1582.  
  1583.  
  1584.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1585.                                                                                             #pragma parameter __A0 GetMaskTable
  1586.                                                                                             #endif
  1587. EXTERN_API( Ptr )
  1588. GetMaskTable                    (void)                                                        ONEWORDINLINE(0xA836);
  1589.  
  1590. EXTERN_API( PatHandle )
  1591. GetPattern                        (short                     patternID)                            ONEWORDINLINE(0xA9B8);
  1592.  
  1593. EXTERN_API( CursHandle )
  1594. GetCursor                        (short                     cursorID)                            ONEWORDINLINE(0xA9B9);
  1595.  
  1596. EXTERN_API( PicHandle )
  1597. GetPicture                        (short                     pictureID)                            ONEWORDINLINE(0xA9BC);
  1598.  
  1599. EXTERN_API( long )
  1600. DeltaPoint                        (Point                     ptA,
  1601.                                  Point                     ptB)                                ONEWORDINLINE(0xA94F);
  1602.  
  1603. EXTERN_API( void )
  1604. ShieldCursor                    (const Rect *            shieldRect,
  1605.                                  Point                     offsetPt)                            ONEWORDINLINE(0xA855);
  1606.  
  1607. EXTERN_API( void )
  1608. ScreenRes                        (short *                scrnHRes,
  1609.                                  short *                scrnVRes)                            SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
  1610.  
  1611. EXTERN_API( void )
  1612. GetIndPattern                    (Pattern *                thePat,
  1613.                                  short                     patternListID,
  1614.                                  short                     index);
  1615.  
  1616.  
  1617. #if CGLUESUPPORTED
  1618. EXTERN_API_C( Boolean )
  1619. ptinrect                        (const Point *            pt,
  1620.                                  const Rect *            r);
  1621.  
  1622. EXTERN_API_C( void )
  1623. pt2rect                            (const Point *            pt1,
  1624.                                  const Point *            pt2,
  1625.                                  Rect *                    destRect);
  1626.  
  1627. EXTERN_API_C( void )
  1628. pttoangle                        (const Rect *            r,
  1629.                                  const Point *            pt,
  1630.                                  short *                angle);
  1631.  
  1632. EXTERN_API_C( Boolean )
  1633. ptinrgn                            (const Point *            pt,
  1634.                                  RgnHandle                 rgn);
  1635.  
  1636. EXTERN_API_C( void )
  1637. addpt                            (const Point *            src,
  1638.                                  Point *                dst);
  1639.  
  1640. EXTERN_API_C( void )
  1641. subpt                            (const Point *            src,
  1642.                                  Point *                dst);
  1643.  
  1644. EXTERN_API_C( Boolean )
  1645. equalpt                            (const Point *            pt1,
  1646.                                  const Point *            pt2);
  1647.  
  1648. EXTERN_API_C( void )
  1649. stuffhex                        (void *                    thingPtr,
  1650.                                  const char *            s);
  1651.  
  1652. EXTERN_API_C( void )
  1653. stdline                            (const Point *            newPt);
  1654.  
  1655. EXTERN_API_C( void )
  1656. shieldcursor                    (const Rect *            shieldRect,
  1657.                                  Point *                offsetPt);
  1658.  
  1659. EXTERN_API_C( long )
  1660. deltapoint                        (Point *                ptA,
  1661.                                  Point *                ptB);
  1662.  
  1663. #endif  /* CGLUESUPPORTED */
  1664.  
  1665. #if OLDROUTINENAMES
  1666. #define DisposPixMap(pm) DisposePixMap(pm)
  1667. #define DisposPixPat(pp) DisposePixPat(pp)
  1668. #define DisposCTable(cTable) DisposeCTable(cTable)
  1669. #define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
  1670. #if OLDROUTINELOCATIONS
  1671. #define DisposCIcon(theIcon) DisposeCIcon(theIcon)
  1672. #endif  /* OLDROUTINELOCATIONS */
  1673.  
  1674. #define DisposGDevice(gdh) DisposeGDevice(gdh)
  1675. #endif  /* OLDROUTINENAMES */
  1676.  
  1677. /*
  1678.     From ToolUtils.i
  1679. */
  1680. EXTERN_API( void )
  1681. PackBits                        (Ptr *                    srcPtr,
  1682.                                  Ptr *                    dstPtr,
  1683.                                  short                     srcBytes)                            ONEWORDINLINE(0xA8CF);
  1684.  
  1685. EXTERN_API( void )
  1686. UnpackBits                        (Ptr *                    srcPtr,
  1687.                                  Ptr *                    dstPtr,
  1688.                                  short                     dstBytes)                            ONEWORDINLINE(0xA8D0);
  1689.  
  1690.  
  1691. /*
  1692.     Also from ToolUtils.i
  1693. */
  1694. EXTERN_API( Fixed )
  1695. SlopeFromAngle                    (short                     angle)                                ONEWORDINLINE(0xA8BC);
  1696.  
  1697. EXTERN_API( short )
  1698. AngleFromSlope                    (Fixed                     slope)                                ONEWORDINLINE(0xA8C4);
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707. /*----------------------------PICT • Quickdraw Picture----------------------------------*/
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714. #if PRAGMA_STRUCT_ALIGN
  1715.     #pragma options align=reset
  1716. #elif PRAGMA_STRUCT_PACKPUSH
  1717.     #pragma pack(pop)
  1718. #elif PRAGMA_STRUCT_PACK
  1719.     #pragma pack()
  1720. #endif
  1721.  
  1722. #ifdef PRAGMA_IMPORT_OFF
  1723. #pragma import off
  1724. #elif PRAGMA_IMPORT
  1725. #pragma import reset
  1726. #endif
  1727.  
  1728. #ifdef __cplusplus
  1729. }
  1730. #endif
  1731.  
  1732. #endif /* __QUICKDRAW__ */
  1733.  
  1734.